package com.co.view;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JLabel;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JTextField;

import javax.swing.WindowConstants;

import com.co.utils.Logger;



/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class PacientePage extends javax.swing.JFrame {
	private JMenuBar jMenuBar1;
	private JLabel jLabelTelefono;
	private JTextField jTextFieldOS;
	private JTextField jTextFieldTelefono;
	private JTextField jTextFieldDomicilio;
	private JLabel jLabelDomicilio;
	private JComboBox jComboBoxDia;
	private JComboBox jComboBoxMes;
	private JComboBox jComboBoxAnio;
	private JLabel jLabelFechaNac;
	private JMenuItem jMenuItem2;
	private JMenuItem jMenuItem1;
	private JMenu jMenu1;
	private String title = "Paciente";
	private JTextField jTextFieldDni;
	private JLabel jLabelObraSocial;
	private JTextField jTextFieldNombre;
	private JLabel jLabel1;
	private JLabel jLabelNombre;
	private JLabel jLabelApellido;
	private JLabel jLabelDni;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		PacientePage inst = new PacientePage();
		inst.setVisible(true);
	}
	
	public PacientePage() {
		super();
		initGUI();
	}
	
	private static PacientePage pacientePageInstance;
	
	public static PacientePage getInstance(){
		if (pacientePageInstance == null){
			pacientePageInstance = new PacientePage();
		}
		return pacientePageInstance;
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jMenuBar1 = new JMenuBar();
				setJMenuBar(jMenuBar1);
				jMenuBar1.setPreferredSize(new java.awt.Dimension(384, 16));
				{
					jMenu1 = new JMenu();
					jMenuBar1.add(jMenu1);
					jMenu1.setText("Menu");
					{
						jMenuItem1 = new JMenuItem();
						jMenu1.add(jMenuItem1);
						jMenuItem1.setText("Principal");
						jMenuItem1.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
							System.out.println("jMenuItem1.actionPerformed, event="
								+ evt);
							loadIndexPage();
						}
						});
					}
					{
						jMenuItem2 = new JMenuItem();
						jMenu1.add(jMenuItem2);
						jMenuItem2.setText("Salir");
						jMenuItem2.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
							System.out.println("jMenuItem2.actionPerformed, event="
								+ evt);
							System.exit(0);
						}
						});
					}
				}
			}
			pack();
			this.setTitle("Consultorios Odontologicos - " + this.title);
			this.setSize(1024, 453);
			this.setExtendedState(MAXIMIZED_BOTH);
			{
				jLabelDni = new JLabel();
				getContentPane().add(jLabelDni);
				jLabelDni.setText("Dni:");
				jLabelDni.setBounds(60, 39, 60, 30);
			}
			{
				jLabelApellido = new JLabel();
				getContentPane().add(jLabelApellido);
				jLabelApellido.setText("Apellido: ");
				jLabelApellido.setBounds(61, 78, 63, 28);
			}
			{
				jLabelNombre = new JLabel();
				getContentPane().add(jLabelNombre);
				jLabelNombre.setText("Nombre:");
				
				jLabelNombre.setBounds(61, 126, 63, 28);
			}
			{
				jTextFieldDni = new JTextField();
				getContentPane().add(jTextFieldDni);
				jTextFieldDni.setBounds(140, 42, 63, 28);
			}
			{
				jLabel1 = new JLabel();
				getContentPane().add(jLabel1);
				jLabel1.setBounds(140, 84, 63, 28);
			}
			{
				jTextFieldNombre = new JTextField();
				getContentPane().add(jTextFieldNombre);
				jTextFieldNombre.setBounds(140, 126, 63, 28);
			}
			{
				jLabelObraSocial = new JLabel();
				getContentPane().add(jLabelObraSocial);
				jLabelObraSocial.setText("Obra Social:");
				jLabelObraSocial.setBounds(63, 182, 63, 28);
			}
			{
				jLabelFechaNac = new JLabel();
				getContentPane().add(jLabelFechaNac);
				jLabelFechaNac.setText("Fecha de Nacimiento:");
				jLabelFechaNac.setBounds(63, 231, 63, 28);
			}
			{
				ComboBoxModel jComboBoxAnioModel = new DefaultComboBoxModel(
					new String[] { "Item One", "Item Two" });
				jComboBoxAnio = new JComboBox();
				getContentPane().add(jComboBoxAnio);
				jComboBoxAnio.setModel(jComboBoxAnioModel);
				jComboBoxAnio.setBounds(189, 231, 63, 28);
			}
			{
				ComboBoxModel jComboBoxMesModel = new DefaultComboBoxModel(
					new String[] { "Item One", "Item Two" });
				jComboBoxMes = new JComboBox();
				getContentPane().add(jComboBoxMes);
				jComboBoxMes.setModel(jComboBoxMesModel);
				jComboBoxMes.setBounds(280, 231, 63, 28);
			}
			{
				ComboBoxModel jComboBoxDiaModel = new DefaultComboBoxModel(
					new String[] { "Item One", "Item Two" });
				jComboBoxDia = new JComboBox();
				getContentPane().add(jComboBoxDia);
				jComboBoxDia.setModel(jComboBoxDiaModel);
				jComboBoxDia.setBounds(371, 231, 63, 28);
			}
			{
				jLabelDomicilio = new JLabel();
				getContentPane().add(jLabelDomicilio);
				jLabelDomicilio.setText("Domicilio:");
				jLabelDomicilio.setBounds(63, 280, 63, 28);
			}
			{
				jLabelTelefono = new JLabel();
				getContentPane().add(jLabelTelefono);
				jLabelTelefono.setText("Telefono:");
				jLabelTelefono.setBounds(63, 336, 63, 28);
			}
			{
				jTextFieldDomicilio = new JTextField();
				getContentPane().add(jTextFieldDomicilio);
				jTextFieldDomicilio.setBounds(140, 287, 63, 28);
			}
			{
				jTextFieldTelefono = new JTextField();
				getContentPane().add(jTextFieldTelefono);
				jTextFieldTelefono.setBounds(140, 343, 63, 28);
			}
			{
				jTextFieldOS = new JTextField();
				getContentPane().add(jTextFieldOS);
				jTextFieldOS.setBounds(140, 182, 63, 28);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void loadIndexPage() {
		Logger.showMessage("- loadIndexPage -");
		
		MainMenuPage indexPage = MainMenuPage.getInstance();
		indexPage.setVisible(true);
		
		PacientePage pacientePage = PacientePage.getInstance();
		pacientePage.setVisible(false);
		
	}

}
